﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YArchitech.HVAC.AuxiliaryCurve
{
	public class AngleNumberCurve : AuxiliaryCurve
	{
		public AngleNumberCurve(XYZ minArgu, XYZ maxArgu, XYZ anglePtArgu, int xNumberArgu, int yNumberArgu, double xSideArgu, double ySideArgu, ExternalCommandData cmdArgu, AuxiliaryCurveType typeArgu, Element elementArgu = null) : base(xSideArgu, ySideArgu, cmdArgu, typeArgu)
		{
			double num = minArgu.DistanceTo(maxArgu);
			if (num > cmdArgu.Application.Application.ShortCurveTolerance && num > xSideArgu && num > ySideArgu)
			{
				this.objectHandle = new AngleHandle(ref minArgu, ref maxArgu, ref anglePtArgu, xSideArgu, ySideArgu, true);
				this.objectPointsGet = new AngleNumberPointsGet(minArgu, maxArgu, anglePtArgu, xNumberArgu, yNumberArgu, ref this.dicX, ref this.dicY);
			}
		}
	}
}
